<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->

<div class="aui-header-2 aui-gutter-column-md">
    <h2>{{'common_basic_info_label' | i18n}}</h2>
</div>
<resoure-base-info [source]="source" [sourceType]="sourceType"></resoure-base-info>
<ng-container *ngIf="sourceType === dataMap.Resource_Type.kubernetesDatasetCommon.value; else elseTemplate">
    <ng-container *ngIf="source?.extendInfo?.labels || source?.extendInfo?.excludeLabels">
        <div class="aui-header-2 aui-gutter-column-md aui-top">
            <h2>{{'protection_labels_label' | i18n}}</h2>
        </div>
        <lv-form>
            <lv-form-item *ngIf="source?.extendInfo?.labels">
                <lv-form-label> {{'protection_include_tag_label' |i18n}}</lv-form-label>
                <lv-form-control>
                    <span lv-overflow>{{source?.extendInfo?.labels}}</span>
                </lv-form-control>
            </lv-form-item>
            <lv-form-item *ngIf="source?.extendInfo?.excludeLabels">
                <lv-form-label>{{'protection_exclude_tag_label' |i18n}}</lv-form-label>
                <lv-form-control>
                    <span lv-overflow>{{source?.extendInfo?.excludeLabels}}</span>
                </lv-form-control>
            </lv-form-item>
        </lv-form>
    </ng-container>
</ng-container>
<ng-template #elseTemplate>
    <div class="aui-header-2 aui-gutter-column-md aui-top">
        <h2>{{'common_kubernetes_volume_name_label' | i18n}}</h2>
    </div>
    <lv-pro-table [data]="tableData" [config]="tableConfig"></lv-pro-table>
</ng-template>